Skip to main content

Changing ACF Fields in code

If you decide to manually change ACF Json files, note that you need to update the modified timestamp (last line in the ACF Json file) to a more recent date along with your changes, in order to trigger the ACF Sync & ACFE Force Sync features.

For example, the modified timestamp 1637788093 tells to ACF that the last time the file was updated was the 24/11/2021 at 19:08:13.

If you make a change in the Json file using your text editor, you have to set a date that is newer than the one in the database. Most of the time you can simply add 1 second to that setting. So ACF will compare it with the date from Field Group in the database and understand that there is a newer version. In this example, 1637788093 should become at least 1637788094.

The process is automatic when the Field Group is updated from the ACF Admin UI, since this modified setting is updated to the current timestamp.

You can use online tools such as epochconverter.com to convert a timestamp to a readable date.